<h2 id="cargo_uninstall_name">NAME</h2>
<div class="sectionbody">
<p>cargo-uninstall - Remove a Rust binary</p>
</div>
<div class="sect1">
<h2 id="cargo_uninstall_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="paragraph">
<p><code>cargo uninstall [<em>OPTIONS</em>] [<em>SPEC</em>&#8230;&#8203;]</code></p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cargo_uninstall_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="paragraph">
<p>This command removes a package installed with <a href="cargo-install.html">cargo-install(1)</a>. The <em>SPEC</em>
argument is a package ID specification of the package to remove (see
<a href="cargo-pkgid.html">cargo-pkgid(1)</a>).</p>
</div>
<div class="paragraph">
<p>By default all binaries are removed for a crate but the <code>--bin</code> and
<code>--example</code> flags can be used to only remove particular binaries.</p>
</div>
<div class="paragraph">
<p>The installation root is determined, in order of precedence:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>--root</code> option</p>
</li>
<li>
<p><code>CARGO_INSTALL_ROOT</code> environment variable</p>
</li>
<li>
<p><code>install.root</code> Cargo <a href="../reference/config.html">config value</a></p>
</li>
<li>
<p><code>CARGO_HOME</code> environment variable</p>
</li>
<li>
<p><code>$HOME/.cargo</code></p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cargo_uninstall_options">OPTIONS</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="cargo_uninstall_install_options">Install Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>-p</strong></dt>
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em>&#8230;&#8203;</dt>
<dd>
<p>Package to uninstall.</p>
</dd>
<dt class="hdlist1"><strong>--bin</strong> <em>NAME</em>&#8230;&#8203;</dt>
<dd>
<p>Only uninstall the binary <em>NAME</em>.</p>
</dd>
<dt class="hdlist1"><strong>--root</strong> <em>DIR</em></dt>
<dd>
<p>Directory to uninstall packages from.</p>
</dd>
</dl>
</div>
</div>
<div class="sect2">
<h3 id="cargo_uninstall_display_options">Display Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>-v</strong></dt>
<dt class="hdlist1"><strong>--verbose</strong></dt>
<dd>
<p>Use verbose output. May be specified twice for "very verbose" output which
includes extra output such as dependency warnings and build script output.
May also be specified with the <code>term.verbose</code>
<a href="../reference/config.html">config value</a>.</p>
</dd>
<dt class="hdlist1"><strong>-q</strong></dt>
<dt class="hdlist1"><strong>--quiet</strong></dt>
<dd>
<p>No output printed to stdout.</p>
</dd>
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
<dd>
<p>Control when colored output is used. Valid values:</p>
<div class="ulist">
<ul>
<li>
<p><code>auto</code> (default): Automatically detect if color support is available on the
terminal.</p>
</li>
<li>
<p><code>always</code>: Always display colors.</p>
</li>
<li>
<p><code>never</code>: Never display colors.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>May also be specified with the <code>term.color</code>
<a href="../reference/config.html">config value</a>.</p>
</div>
</dd>
</dl>
</div>
</div>
<div class="sect2">
<h3 id="cargo_uninstall_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
<p>Prints help information.</p>
</dd>
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>&#8230;&#8203;</dt>
<dd>
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
details.</p>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cargo_uninstall_environment">ENVIRONMENT</h2>
<div class="sectionbody">
<div class="paragraph">
<p>See <a href="../reference/environment-variables.html">the reference</a> for
details on environment variables that Cargo reads.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cargo_uninstall_exit_status">Exit Status</h2>
<div class="sectionbody">
<div class="dlist">
<dl>
<dt class="hdlist1">0</dt>
<dd>
<p>Cargo succeeded.</p>
</dd>
<dt class="hdlist1">101</dt>
<dd>
<p>Cargo failed to complete.</p>
</dd>
</dl>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cargo_uninstall_examples">EXAMPLES</h2>
<div class="sectionbody">
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Uninstall a previously installed package.</p>
<div class="literalblock">
<div class="content">
<pre>cargo uninstall ripgrep</pre>
</div>
</div>
</li>
</ol>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cargo_uninstall_see_also">SEE ALSO</h2>
<div class="sectionbody">
<div class="paragraph">
<p><a href="index.html">cargo(1)</a>, <a href="cargo-install.html">cargo-install(1)</a></p>
</div>
</div>
</div>